class CreateSurveyPoints < ActiveRecord::Migration
  def self.up
    create_table :survey_points do |t|
      t.column :idcode, :string,          :limit => 40, :null => false
      t.column :has_many_points,          :boolean,     :default => false
      t.column :project_id,               :int,         :null => false
      t.column :inspect_trunk_id,         :integer
      t.column :inspect_section_id,       :integer
      t.column :construction_approach_id, :integer
      t.column :survey_type_id,           :integer
      t.column :unit_id,                  :integer,     :null => false
      t.column :remark,                   :text
    end
  end

  def self.down
    drop_table :survey_points
  end
end
